package com.campus.user.controller;


import com.campus.common.repairTechnician.entity.RepairTechnician;
import com.campus.common.repairTechnician.entity.dto.AddRepairTechnicianDTO;
import com.campus.common.repairTechnician.service.IRepairTechnicianService;
import com.campus.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 维修人员表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-18
 */
@Controller
@RequestMapping("/repair-technician")
@Tag(name = "维修人员管理")
public class RepairTechnicianController {

    @Autowired
    private IRepairTechnicianService repairTechnicianService;

    @PostMapping("/addRepairTechnician")
    @Operation(summary = "完善维修人员信息")
    public Result addRepairTechnicianFun(@RequestBody AddRepairTechnicianDTO addRepairTechnicianDTO) {
        return repairTechnicianService.addRepairTechnician(addRepairTechnicianDTO);
    }

    @PutMapping("/editRepairTechnician")
    @Operation(summary = "编辑维修人员信息")
    public Result editRepairTechnicianFun(@RequestBody RepairTechnician repairTechnician) {
        return repairTechnicianService.editRepairTechnician(repairTechnician);
    }

}
